package kuanshu.mapper;

import kuanshu.bean.FangWuJiBenXinXi;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FangWuJiBenXinXiMapper {
    @Insert({"insert into `fangwujibenxinxi` values(null,#{fangchanbianhao},#{fangyuanbiaoti},#{fangwuleixing},#{huxing},#{suozaiceng},#{zongcengshu},#{jianzhumianji},#{shiyongmianji},#{shengfen},#{chengshi},#{quxian},#{xiangxidizhi},#{fabushijian},#{lianxidianhua},#{yuezujin})"})
    int add(FangWuJiBenXinXi fangWuJiBenXinXi);

    @Select("select b.* from fangwujibenxinxi b")
    List<FangWuJiBenXinXi> fangyuan();
    @Select("select b.* from fangwujibenxinxi b order by fabushijian desc limit 0,5")
    List<FangWuJiBenXinXi> zuixinfangyuan();
    @Select("select b.* from fangwujibenxinxi b order by yuezujin asc limit 0,5")
    List<FangWuJiBenXinXi> zuipianyifangyuan();
    @Select("select b.* from fangwujibenxinxi b where b.fangyuanbiaoti like concat('%',#{fangyuanbiaoti},'%')")
    List<FangWuJiBenXinXi> chakan(String fangyuanbiaoti);





}
